home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / linux-bo / dless-li / root.no / etc / rc.d / rc.serial < prev   
Text File  |  1995-04-26  |  8KB  |  207 lines

  1. #!/bin/sh
  2. #
  3. # /etc/rc.serial 
  4. #    Initializes the serial ports on your system
  5. #
  6. #    Version 2.01
  7. #
  8. # Without uncommenting some of the lines in this script, you'll be unable to
  9. # use ports other than the first two, and those only if they use "standard"
  10. # IRQ values (whatever those are... :^)  The rc.serial script made a couple
  11. # machines I tested this on hang at this point in the boot process, so it's
  12. # commented out by default. However, if you need to set up extended serial
  13. # ports, it's a very good starting point. It usually works great.
  14. # More info that will be useful: I did some testing and found that the lines
  15. # in /etc/rc.d/rc.serial that are most likely to make the machine hang are the
  16. # one that sets up /dev/cua3, and the last time, which causes a report to be
  17. # issued to the console about how the ports were configured. This tries to
  18. # report on *every* port... if you change it so it only lists the ports you're
  19. # going to use (/dev/cua0 /dev/cua1 /dev/cua2 for example) that it probably
  20. # won't cause a hang. Also, the "wild" interrupt detection used for auto-
  21. # configuration can cause problems as well. I highly recommend using the
  22. # manual configuration lines to avoid trouble.
  23. #
  24.  
  25. cd /dev
  26.  
  27. SETSERIAL="/bin/setserial -b"
  28. PORTS=`echo cua? cua??`
  29.  
  30. echo -n "Configuring serial ports...."
  31.  
  32. # Do wild interrupt detection (uncomment if you're brave enough to
  33. # attempt auto-configuration... )
  34. #
  35. # ${SETSERIAL} -W ${PORTS}
  36.  
  37. ###############################################################
  38. #
  39. # AUTOMATIC CONFIGURATION 
  40. #
  41. # Uncomment the appropriate lines below to enable auto-configuration
  42. # of a particular board.  Or comment them out to disable them....
  43. #
  44. ###############################################################
  45.  
  46. # Do AUTOMATIC_IRQ probing
  47. #
  48. AUTO_IRQ=auto_irq
  49.  
  50. # These are the standard COM1 through COM4 devices
  51. #
  52. # If you have an internal modeme with a Rockwell Chipset, add a "skip_test"
  53. # to the /dev/cua3 line below.  (It's not added by default because it will
  54. # screw up people with 8514 displays).
  55. #
  56. # ${SETSERIAL} /dev/cua0 ${AUTO_IRQ} skip_test autoconfig
  57. # ${SETSERIAL} /dev/cua1 ${AUTO_IRQ} skip_test autoconfig
  58. # ${SETSERIAL} /dev/cua2 ${AUTO_IRQ} skip_test autoconfig
  59. # ${SETSERIAL} /dev/cua3 ${AUTO_IRQ} autoconfig
  60.  
  61. # These are for the first AST Fourport board (base address 0x1A0)
  62. #
  63. # ${SETSERIAL} /dev/cua4 ${AUTO_IRQ} autoconfig
  64. # ${SETSERIAL} /dev/cua5 ${AUTO_IRQ} autoconfig
  65. # ${SETSERIAL} /dev/cua6 ${AUTO_IRQ} autoconfig
  66. # ${SETSERIAL} /dev/cua7 ${AUTO_IRQ} autoconfig
  67.  
  68. # These are for the second AST Fourport board (base address 0x2A0)
  69. #
  70. # ${SETSERIAL} /dev/cua8 ${AUTO_IRQ} autoconfig
  71. # ${SETSERIAL} /dev/cua9 ${AUTO_IRQ} autoconfig
  72. # ${SETSERIAL} /dev/cua10 ${AUTO_IRQ} autoconfig
  73. # ${SETSERIAL} /dev/cua11 ${AUTO_IRQ} autoconfig
  74.  
  75. # These are the 3rd and 4th ports on the Accent Async board.
  76. #
  77. # ${SETSERIAL} /dev/cua12 ${AUTO_IRQ} autoconfig
  78. # ${SETSERIAL} /dev/cua13 ${AUTO_IRQ} autoconfig
  79.  
  80. # Usenet Serial Board II (base address 0x100)
  81. #
  82. # ${SETSERIAL} /dev/cua16 ${AUTO_IRQ} autoconfig
  83. # ${SETSERIAL} /dev/cua17 ${AUTO_IRQ} autoconfig
  84. # ${SETSERIAL} /dev/cua18 ${AUTO_IRQ} autoconfig
  85. # ${SETSERIAL} /dev/cua19 ${AUTO_IRQ} autoconfig
  86.  
  87.  
  88. # BocaBoard 4 port (BB-1004) (base address 0x100)
  89. # ${SETSERIAL} /dev/cua16 ${AUTO_IRQ} autoconfig
  90. # ${SETSERIAL} /dev/cua17 ${AUTO_IRQ} autoconfig
  91. # ${SETSERIAL} /dev/cua18 ${AUTO_IRQ} autoconfig
  92. # ${SETSERIAL} /dev/cua19 ${AUTO_IRQ} autoconfig
  93.  
  94. # BocaBoard 8 port (BB-1008) (base address 0x100),
  95. # or two BB-1004's (base addresses 0x100 and 0x120)
  96. #
  97. # ${SETSERIAL} /dev/cua16 ${AUTO_IRQ} autoconfig
  98. # ${SETSERIAL} /dev/cua17 ${AUTO_IRQ} autoconfig
  99. # ${SETSERIAL} /dev/cua18 ${AUTO_IRQ} autoconfig
  100. # ${SETSERIAL} /dev/cua19 ${AUTO_IRQ} autoconfig
  101. # ${SETSERIAL} /dev/cua20 ${AUTO_IRQ} autoconfig
  102. # ${SETSERIAL} /dev/cua21 ${AUTO_IRQ} autoconfig
  103. # ${SETSERIAL} /dev/cua22 ${AUTO_IRQ} autoconfig
  104. # ${SETSERIAL} /dev/cua23 ${AUTO_IRQ} autoconfig
  105.  
  106. # BocaBoard 16 port (BB-1008), (base address 0x100),
  107. # or two BB-1008's (base addresses 0x100 and 0x140),
  108. # or four BB-1004's (base address 0x100, 0x120, 0x140, and 0x160)
  109. #
  110. # Warning --- some of these ports may conflict with the Future Domain
  111. # SCSI controller.  If you want to run both the BocaBoards and the 
  112. # Future Domain controller, you may need to change the port assignment
  113. # of the Bocaboards -- see below in the section on manual configuration.
  114. #
  115. # ${SETSERIAL} /dev/cua16 ${AUTO_IRQ} autoconfig
  116. # ${SETSERIAL} /dev/cua17 ${AUTO_IRQ} autoconfig
  117. # ${SETSERIAL} /dev/cua18 ${AUTO_IRQ} autoconfig
  118. # ${SETSERIAL} /dev/cua19 ${AUTO_IRQ} autoconfig
  119. # ${SETSERIAL} /dev/cua20 ${AUTO_IRQ} autoconfig
  120. # ${SETSERIAL} /dev/cua21 ${AUTO_IRQ} autoconfig
  121. # ${SETSERIAL} /dev/cua22 ${AUTO_IRQ} autoconfig
  122. # ${SETSERIAL} /dev/cua23 ${AUTO_IRQ} autoconfig
  123. # ${SETSERIAL} /dev/cua24 ${AUTO_IRQ} autoconfig
  124. # ${SETSERIAL} /dev/cua25 ${AUTO_IRQ} autoconfig
  125. # ${SETSERIAL} /dev/cua26 ${AUTO_IRQ} autoconfig
  126. # ${SETSERIAL} /dev/cua27 ${AUTO_IRQ} autoconfig
  127. # ${SETSERIAL} /dev/cua28 ${AUTO_IRQ} autoconfig
  128. # ${SETSERIAL} /dev/cua29 ${AUTO_IRQ} autoconfig
  129. # ${SETSERIAL} /dev/cua30 ${AUTO_IRQ} autoconfig
  130. # ${SETSERIAL} /dev/cua31 ${AUTO_IRQ} autoconfig
  131.  
  132. ###############################################################
  133. #
  134. # MANUAL CONFIGURATION 
  135. #
  136. # If you want to do manual configuration of one or more of your 
  137. # serial ports, uncomment and modify the relevant lines.
  138. #
  139. ###############################################################
  140.  
  141. # These are the standard COM1 through COM4 devices
  142. #
  143. # ${SETSERIAL} /dev/cua0 uart 16450 port 0x3F8 irq 4
  144. # ${SETSERIAL} /dev/cua1 uart 16450 port 0x2F8 irq 3
  145. # ${SETSERIAL} /dev/cua2 uart 16450 port 0x3E8 irq 4
  146. # ${SETSERIAL} /dev/cua3 uart 16450 port 0x2E8 irq 3
  147.  
  148. # These are the first set of AST Fourport ports
  149. #
  150. # ${SETSERIAL} /dev/cua4 uart 16450 port 0x1A0 irq 9 fourport
  151. # ${SETSERIAL} /dev/cua5 uart 16450 port 0x1A8 irq 9 fourport
  152. # ${SETSERIAL} /dev/cua6 uart 16450 port 0x1B0 irq 9 fourport
  153. # ${SETSERIAL} /dev/cua7 uart 16450 port 0x1B8 irq 9 fourport
  154.  
  155. # These are the second set of AST Fourport ports
  156. #
  157. # ${SETSERIAL} /dev/cua8 uart 16450 port 0x2A0 irq 5 fourport
  158. # ${SETSERIAL} /dev/cua9 uart 16450 port 0x2A8 irq 5 fourport
  159. # ${SETSERIAL} /dev/cua10 uart 16450 port 0x2B0 irq 5 fourport
  160. # ${SETSERIAL} /dev/cua11 uart 16450 port 0x2B8 irq 5 fourport
  161.  
  162. # These are the 3rd and 4th ports on the Accent Async board.
  163. #
  164. # ${SETSERIAL} /dev/cua12 uart 16450 port 0x330 irq 4
  165. # ${SETSERIAL} /dev/cua13 uart 16450 port 0x338 irq 4
  166.  
  167. # These are two spare devices you can use to customize for 
  168. # some board which is not supported above....
  169. # ${SETSERIAL} /dev/cua14 uart XXXXX port XXXX irq X
  170. # ${SETSERIAL} /dev/cua15 uart XXXXX port XXXX irq X
  171.  
  172. # These are the ports used for either the Usenet Serial II
  173. # board, or the Boca Board 4, 8, or 16 port boards.
  174. #
  175. # Uncomment only the first 4 lines for the Usenet Serial II board,
  176. # and uncomment the first 4, 8, or all 16 lines for the
  177. # Boca Board BB-1004, BB-1008, and BB-2016 respectively.
  178. #
  179. # ${SETSERIAL} /dev/cua16 uart 16550A port 0x100 irq 12
  180. # ${SETSERIAL} /dev/cua17 uart 16550A port 0x108 irq 12
  181. # ${SETSERIAL} /dev/cua18 uart 16550A port 0x110 irq 12
  182. # ${SETSERIAL} /dev/cua19 uart 16550A port 0x118 irq 12
  183. # ${SETSERIAL} /dev/cua20 uart 16550A port 0x120 irq 12
  184. # ${SETSERIAL} /dev/cua21 uart 16550A port 0x128 irq 12
  185. # ${SETSERIAL} /dev/cua22 uart 16550A port 0x130 irq 12
  186. # ${SETSERIAL} /dev/cua23 uart 16550A port 0x138 irq 12
  187. # ${SETSERIAL} /dev/cua24 uart 16550A port 0x140 irq 12
  188. # ${SETSERIAL} /dev/cua25 uart 16550A port 0x148 irq 12
  189. # ${SETSERIAL} /dev/cua26 uart 16550A port 0x150 irq 12
  190. # ${SETSERIAL} /dev/cua27 uart 16550A port 0x158 irq 12
  191. # ${SETSERIAL} /dev/cua28 uart 16550A port 0x160 irq 12
  192. # ${SETSERIAL} /dev/cua29 uart 16550A port 0x168 irq 12
  193. # ${SETSERIAL} /dev/cua30 uart 16550A port 0x170 irq 12
  194. # ${SETSERIAL} /dev/cua31 uart 16550A port 0x178 irq 12
  195.  
  196. ###########################################################
  197. #
  198. # Print the results of the serial configuration process
  199. #
  200. ###########################################################
  201.  
  202. echo "done."
  203.  
  204. ${SETSERIAL} -bg ${PORTS}
  205.  
  206.